package com.cuit.service.impl;

import com.cuit.dao.StaffDao;
import com.cuit.doamin.Staff;
import com.cuit.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("staffService")
public class StaffServiceImpl implements StaffService {

    @Autowired
    private StaffDao staffDao;

    @Override
    public List<Staff> findAll() {

        return staffDao.findAll();
    }

    @Override
    public List<Staff> findPosition(String position) {
        return staffDao.findPosition(position);
    }

    @Override
    public boolean add(Staff staff) {

        return staffDao.add(staff);
    }

    @Override
    public boolean delete(Integer id) {

        return staffDao.delete(id);
    }

    @Override
    public boolean update(Staff staff) {

        return staffDao.update(staff);
    }
}
